Efficient LZ78 Factorization of Grammar Compressed Text

نویسندگان

  • Hideo Bannai
  • Shunsuke Inenaga
  • Masayuki Takeda
چکیده

We present an efficient algorithm for computing the LZ78 factorization of a text, where the text is represented as a straight line program (SLP), which is a context free grammar in the Chomsky normal form that generates a single string. Given an SLP of size n representing a text S of length N , our algorithm computes the LZ78 factorization of T in O(n √ N + m logN) time and O(n √ N + m) space, where m is the number of resulting LZ78 factors. We also show how to improve the algorithm so that the n √ N term in the time and space complexities becomes either nL, where L is the length of the longest LZ78 factor, or (N − α) where α ≥ 0 is a quantity which depends on the amount of redundancy that the SLP captures with respect to substrings of S of a certain length. Since m = O(N/ log σ N) where σ is the alphabet size, the latter is asymptotically at least as fast as a linear time algorithm which runs on the uncompressed string when σ is constant, and can be more efficient when the text is compressible, i.e. when m and n are small.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Dynamic index, LZ factorization, and LCE queries in compressed space

In this paper, we present the following results: (1) We propose a new dynamic compressed index of O(w) space, that supports searching for a pattern P in the current text in O(|P | logw+logw log |P | logN(log M)+occ logN) time and insertion/deletion of a substring of length y in O((y + logN log M) logw logN log M) time, where N is the length of the current text, M is the maximum length of the dy...

متن کامل

Threshold Approximate Matching in Grammar-Compressed Strings

A grammar-compressed (GC) string is a string generated by a context-free grammar. This compression model captures many practical applications, and includes LZ78 and LZW compression as a special case. We give an efficient algorithm for threshold approximate matching on a GC-text against a plain pattern. Our algorithm improves on existing algorithms whenever the pattern is sufficiently long. The ...

متن کامل

Efficient Lyndon Factorization of Grammar Compressed Text

We present an algorithm for computing the Lyndon factorization of a string that is given in grammar compressed form, namely, a Straight Line Program (SLP). The algorithm runs in O(n + mnh) time and O(n) space, where m is the size of the Lyndon factorization, n is the size of the SLP, and h is the height of the derivation tree of the SLP. Since the length of the decompressed string can be expone...

متن کامل

Dynamic Index and LZ Factorization in Compressed Space

In this paper, we propose a new dynamic compressed index of O(w) space for a dynamic text T , where w = O(min(z logN log M,N)) is the size of the signature encoding of T , z is the size of the Lempel-Ziv77 (LZ77) factorization of T , N is the length of T , and M ≥ 3N is an integer that can be handled in constant time under word RAM model. Our index supports searching for a pattern P in T in O(|...

متن کامل

A General Practical Approach to Pattern Matching over Ziv-Lempel Compressed Text

We address in this paper the problem of string matching on Lempel-Ziv compressed text. The goal is to search a pattern in a text without uncompressing. This is a highly relevant issue, since it is essential to have compressed text databases where eecient searching is still possible. We develop a general technique for string matching when the text comes as a sequence of blocks. This abstracts th...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012